package com.csgc.camera.widget.dialog

import android.content.Context
import android.view.View

import com.csgc.camera.util.clickWithTrigger
import com.csgc.camera.widget.dialog.base.BottomDialog
import com.cysd.spsyxj.R

class EditImageLabelDialog(val context: Context) {
    private lateinit var mDialog: BottomDialog
    var listListener:OnLabelCheckListener?=null
    init {
        initDialog()
    }

    private fun initDialog(){
        mDialog = BottomDialog(context).apply {
            setContentView(R.layout.dialog_image_label)
            findViewById<View>(R.id.siv_label_1)?.clickWithTrigger {
                listListener?.onLabelCheck(1)
            }
            findViewById<View>(R.id.siv_label_2)?.clickWithTrigger {
                listListener?.onLabelCheck(2)
            }
            findViewById<View>(R.id.siv_label_3)?.clickWithTrigger {
                listListener?.onLabelCheck(3)
            }
        }
    }

    fun show(){
        mDialog.show()
    }


    interface OnLabelCheckListener{
        fun onLabelCheck(style:Int)
    }
}